package com.demo.entity.po;

import java.io.Serializable;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * @Description:小组成员表
 * @Date:2025-03-01
 * @author：author
*/
public class GroupMember implements Serializable {

	/**
	 * 成员ID，主键，自增
	 */
	private Long memberId;

	/**
	 * 关联的小组ID，外键
	 */
	private Long groupId;

	/**
	 * 关联的用户ID，外键
	 */
	private Long userId;

	/**
	 * 加入时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date joinTime;

	/**
	 * 成员角色：普通成员、管理员
	 */
	private Integer role;


	private String username;
	private String avatar;


	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public void setMemberId(Long memberId) {
		this.memberId = memberId;
	}

	public Long getMemberId() {
		return this.memberId;
	}

	public void setGroupId(Long groupId) {
		this.groupId = groupId;
	}

	public Long getGroupId() {
		return this.groupId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getUserId() {
		return this.userId;
	}

	public void setJoinTime(Date joinTime) {
		this.joinTime = joinTime;
	}

	public Date getJoinTime() {
		return this.joinTime;
	}

	public void setRole(Integer role) {
		this.role = role;
	}

	public Integer getRole() {
		return this.role;
	}

	@Override
	public String toString() {
		return "成员ID，主键，自增:" + memberId + ",关联的小组ID，外键:" + groupId + ",关联的用户ID，外键:" + userId + ",加入时间:" + joinTime + ",成员角色：普通成员、管理员:" + role + "";
	}

}